local skill = fk.CreateSkill{
  name = "tea__juejue",
  tags = {Skill.Compulsory}
}
---@type TrigSkelSpec<TrigFunc>
local juejue = {
  anim_type = "special",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(self) and player == target and player.phase == Player.Finish
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:loseHp(player, 1, self.name)
    if not player.dead then
      local cid = player:drawCards(1, self.name)
      room:setCardMark(Fk:getCardById(cid[1]), "@@juejue_mark-inhand", 1)
    end
  end,
}
---@type VisibilitySpec
local juejue_visible = {
  card_visible = function(self, player, card)
    if card:getMark("@@juejue_mark-inhand") > 0 and
      Fk:currentRoom():getCardArea(card) == Card.PlayerHand then
      return true
    end
  end
}
skill:addEffect(fk.EventPhaseStart, juejue)
skill:addEffect("visibility", juejue_visible)
return skill